package com.maxus.mini.common;

import java.text.SimpleDateFormat;

import org.apache.commons.lang3.time.FastDateFormat;

import com.google.gson.Gson;

/**
 * 常量类
 * 
 * @author wujinsong
 *
 */
public class Constants {
	public static final String FILEPATHIMG = "uploadFiles/uploadImgs/"; // 图片上传路径

	/**
	 * 正确返回码
	 */
	public static final String SUCCUSS_CODE = "000000";
	/**
	 * 服务器处理异常
	 */
	public static final String ERROR_CODE = "000001";
	/**
	 * 服务器处理异常
	 */
	public static final String S_ERROR_CODE = "服务器处理异常";

	/**
	 * 请求方式不正确
	 */
	public static final String METHOD_ERROR = "000002";
	/**
	 * 请求方式不正确
	 */
	public static final String S_METHOD_ERROR = "请求方式不正确";

	/**
	 * 参数错误
	 */
	public static final String PARAM_ERROR = "000003";
	/**
	 * 参数错误
	 */
	public static final String S_PARAM_ERROR = "参数错误";

	/**
	 * 系统错误
	 */
	public static final String SYSTEM_ERROR = "000004";
	/**
	 * 系统错误
	 */
	public static final String S_SYSTEM_ERROR = "系统错误";
	/**
	 * 时间误差过大
	 */
	public static final String BUSI_ERROR_000005 = "000005";
	/**
	 * 时间误差过大
	 */
	public static final String S_BUSI_ERROR_000005 = "时间误差过大";

	/**
	 * 参数列表错误
	 */
	public static final String BUSI_ERROR_000006 = "000006";
	/**
	 * 参数列表错误
	 */
	public static final String S_BUSI_ERROR_000006 = "参数列表错误";

	/**
	 * 方法名不存在
	 */
	public static final String BUSI_ERROR_000007 = "000007";
	/**
	 * 方法名不存在
	 */
	public static final String S_BUSI_ERROR_000007 = "方法名不存在";

	/**
	 * 不支持的响应格式
	 */
	public static final String BUSI_ERROR_000008 = "000008";
	/**
	 * 不支持的响应格式
	 */
	public static final String S_BUSI_ERROR_000008 = "不支持的响应格式";

	/**
	 * 重复请求
	 */
	public static final String BUSI_ERROR_000009 = "000009";
	/**
	 * 
	 */
	public static final String S_BUSI_ERROR_000009 = "重复请求";

	/**
	 * sign不正确
	 */
	public static final String BUSI_ERROR_000010 = "000010";

	/**
	 * sign不正确
	 */
	public static final String S_BUSI_ERROR_000010 = "sign不正确";

	/**
	 * 未登陆
	 */
	public static final String BUSI_ERROR_000011 = "000011";

	/**
	 * 未登陆
	 */
	public static final String S_BUSI_ERROR_000011 = "未登陆";

	/**
	 * 七牛ak
	 */
	public static final String qiniu_ak = "ysduD_Oe2H0cugDJ9p1of_ERb3c1tTlLshxwH44M";

	/**
	 * 七牛sk
	 */
	public static final String qiniu_sk = "XHbtMFBw9DO1rJt2aiHZJRvE-lgcQAXef8HdZpuz";

	/**
	 * 
	 */
	public static final String qiniu_bucket = "duanxunproject";

	/**
	 * 七牛云url
	 */
	public static final String qiniu_url = "oi42x1205.bkt.clouddn.com/";

	/**
	 * 管道
	 */
	public static final String qiniu_pipeline = "duanxunstack";

	/**
	 * APPSCRET
	 */
	public static final String APP_SCRET = "clothing_app_scret";

	/**
	 * 年月日时分秒
	 */
	public static FastDateFormat df2 = FastDateFormat.getInstance("yyyy-MM-dd HH:mm:ss");

	/**
	 * 服务器端ip
	 */
	public static final String LOCAL_IP = "127.0.0.1";
	public static final String LOCALHOST_IP = "0:0:0:0:0:0:0:1";

	/**
	 * 七牛云上传成功URL
	 */
	public static final String QINIU_UPLOAD_URL = "qiniu_upload_url";

	/**
	 * 七牛云上传成功key
	 */
	public static final String QINIU_UPLOAD_KEY = "qiniu_upload_key";

	/**
	 * 七牛云文件类型
	 */
	public static final String QINIU_UPLOAD_FILETYPE = "qiniu_upload_filetype";
	
	/**
	 * 名称
	 */
	public static final String QINIU_UPLOAD_FILENAME = "qiniu_upload_filename";
	
	/**
	 * 七牛云上传成功附件id
	 */
	public static final String QINIU_UPLOAD_ATTACHMENT_ID = "qiniu_upload_attachment_id";

	/**
	 * 开始页
	 */
	public static final int PAGE_START = 1;

	/**
	 * 模糊搜索返回页大小
	 */
	public static final int PAGE_SIZE_LIKE = 10;

	/**
	 * 默认短讯大小
	 */
	public static final int PAGE_SIZE_DEFAULT_3 = 3;

	/**
	 * 默认附件列表大小
	 */
	public static final int PAGE_SIZE_DEFAULT_8 = 8;
	
	/**
	 * 队列开始
	 */
	public static final String QUEUE_START = "1";
	
	/**
	 * 某某某
	 */
	public static final String ANONYMOUS = "某某某";
	
	/**
	 * 我
	 */
	public static final String ME = "我";
	
	/**
	 * 默认附件页历史大小
	 */
	public static final int PAGE_SIZE_DEFAULT_HISTORY_8 = 8;
	
	/**
	 * 模糊查询大小
	 */
	public static final int LIKE_PAGE_SIZE = 10;
	
	/**
	 * 备注
	 */
	public static final String MEMO = "memo";
	
	/**
	 * 状态
	 */
	public static final String STATUS = "status";
	
	/**
	 * code
	 */
	public static final String CODE = "code";
	
	/**
	 * message
	 */
	public static final String MESSAGE = "message";
	
	/**
	 * json
	 */
	public static final Gson GSON = new Gson(); 
	
	/**
	 * 我的资源
	 */
	public static final String CKEY_FACE_MY_LIST = "face_my_list";
	
	/**
	 * 我的收藏
	 */
	public static final String CKEY_FACE_FAV_LIST = "face_fav_list";
	
	/**
	 * 话题列表
	 */
	public static final String CKEY_TOPIC_LIST = "topic_list";
	
	/**
	 * 资源上传路径
	 */
	public static final String RES_DIR = "img";
	
	/**
	 * 资源跟路径
	 */
	public static final String ROOT_RES_DIR = "D://test//";
	
	/**
	 * 临时
	 */
	public static final String RES_TEMP = "/temp/";
	
	/**
	 * 格式化日期
	 */
	public static SimpleDateFormat  df = new SimpleDateFormat("yyyyMMdd");
}
